package net.tv90.shoppingserver.dao;

import net.tv90.shoppingserver.model.domain.Cart;
import net.tv90.shoppingserver.model.domain.Good;
import net.tv90.shoppingserver.model.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CartRepository extends JpaRepository<Cart, Integer> {
    Cart findCartByUserAndGood(User user, Good good);

    List<Cart> findCartsByUser(User user);
}
